#define _CRT_SECURE_NO_WARNINGS 1


#include<vector>
#include<iostream>

using namespace std;

int findMin(vector<int>& nums)
{
	int min = 999999;

	for (auto& e : nums)
	{
		if (e < min)
		{
			min = e;
		}
	}

	return min == 999999 ? -1 : min;
}

int main()
{
	vector<int> v = { 2,2,2,0,1 };
	cout << findMin(v) << endl;

	return 0;
}